<template>
	<el-row :gutter="20" style="height:60px;backgroundColor:#262526;color:white;lineHeight:60px">
		<el-col :span="6" style="height:60px">
			<router-link to="/home/mainText">	<img src="../../../static/img/logo最新3.png" class="img1"></router-link>

		</el-col>
		<el-col :span="12" style="height:60px;font-size: 12px;letter-spacing: 4px;" >
			全宇支付，为了让支付更简单

		</el-col>
		<el-col :span="4" :offset="2" style="color: black;text-align: center;white-spacing:nowrap">

			<el-button type="text"  @click="open2"><i class="iconfont icon-yykaiguan"></i>安全退出</el-button>
			<!--<el-button type="text" @click="dialogFormVisible = true" >修改密码</el-button>-->

		</el-col>
		<el-dialog title="修改密码" :visible.sync="dialogFormVisible" size="sizy">
			<el-form :model="form" style="text-align:left">
				<el-form-item label="旧密码" :label-width="formLabelWidth">
					<el-input v-model="form.password" auto-complete="off" placeholder="请输入旧密码" type="password"></el-input>
				</el-form-item>
				<el-form-item label="新密码" :label-width="formLabelWidth">
					<el-input v-model="form.newPassword" auto-complete="off" placeholder="请输入新密码" type="password"></el-input>
				</el-form-item>
				<el-form-item label="确认密码" :label-width="formLabelWidth">
					<el-input v-model="form.checkPassword" auto-complete="off" placeholder="请确认输入新密码" type="password"></el-input>
				</el-form-item>

			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogFormVisible = false">取 消</el-button>
				<el-button type="primary" @click="revisePwd">确 定</el-button>
			</div>
		</el-dialog>
	</el-row>
</template>

<script>
	import md5 from 'md5'
	export default {
		data() {
			return {
				dialogFormVisible: false,
				form: {
					password: '',
					newPassword: "",
					checkPassword: ''
				},
				formLabelWidth: '80px'
			}
		},
		created(){
//	console.log(returnCitySN["cip"]+','+returnCitySN["cname"])
		},
		methods: {
			open2() {
				let _this = this;
				this.$confirm('此操作将退出该平台, 是否继续?', '提示', {
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					type: 'warning'
				}).then(() => {
					this.$api.getLogout().then(res => {
						console.log(res.data);
						if(res.data.code == '000000') {

							_this.$message({
								type: 'success',
								message: '退出成功!'
							});
							this.$router.push('/login')
						} else {
							_this.$message.error("退出失败");
              this.$router.push('/login');
						}
					})

				}).catch(() => {
					this.$message({
						type: 'info',
						message: '已取消退出'
					});
				});
			},
			revisePwd() {



			}
		}
	}
</script>

<style lang="less">
	@import url("../../../static/icon1/iconfont.css");
	.img1 {
		height: 38px;
		margin-top: 10px;
	}

	.login:hover {
		cursor: pointer;
		color: deepskyblue;
	}

	.login {
		font-size: 14px;
		text-align: right;
		margin-right: 40px;
		color: white;
	}

	.dearHello {
		cursor: pointer;
		color: white;
		display: inline-block;
		padding-right: 80px;
		height: 50px;
	}
</style>
